<template>
  <div class="option">
    <div
      class="op"
      v-for="(item, index) in opctionArr"
      :key="index"
      :class="{ active: index == num }"
      @click="gaoliang(index)"
    >
      {{ item }}
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 0,
      opctionArr: ["全部", "代销费", "待评价", "退款"],
    };
  },
  methods: {
    gaoliang(index) {
      this.num = index;
    },
  },
};
</script>

<style lang="scss" scoped>
.option {
  width: 100%;
  display: flex;
}
.option .op {
  margin: 5px 10px;
}
.active {
  font-weight: bold;
}
</style>